Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive plugin API to the poly-lithic framework and refactors the CLI to use click instead of argparse. It introduces dynamic plugin discovery through entry points, improves loading times, and adds a subcommand structure with run and plugin commands for better usability.
Key changes:
- Added plugin API with dynamic loading via entry points
- Refactored CLI from argparse to click with subcommands
- Added plugin project generator with Jinja2 templates
- Updated module registries to use standard dictionaries instead of lazy loaders
Reviewed Changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
poly_lithic/src/utils/plugin_registry.py |
Core plugin registry system enabling dynamic plugin discovery and loading |
poly_lithic/src/cli.py |
Complete CLI refactor from argparse to click with subcommands and better UX |
poly_lithic/src/utils/plugin_generator.py |
Plugin project generator using Jinja2 templates |
poly_lithic/templates/plugin/*.j2 |
Template files for generating plugin projects |
poly_lithic/src/transformers/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
poly_lithic/src/interfaces/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
poly_lithic/src/model_utils/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
tests/test_plugin_registry.py |
Comprehensive test suite for plugin registry functionality |
pyproject.toml |
Updated dependencies and entry points for new CLI structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…m failing on github
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a plugin API and refactored the plugins to use click rathrer than argparse at the top level, this lets us add subcommands rin
runpluginetc. that make it clearer as to what we are doing.Because the plugin API uses entrypoints I had a chance to clean it up a bit and loading times have greatly imrpoved.